/**
 * 负责用户交互逻辑
 *
 * Created by lhtin on 2020-04-08T11:41:14.164Z.
 */
import React, { Component } from 'react'
import { View, Text } from 'react-native'
import { AppNavigator, WeBaseScene } from '@webank/trident'


export default class TransferOutResultScene extends WeBaseScene {
  static navigationOptions = ({ navigation: { state: { params = {} } } }) => ({
    hideLeftButton: true,
    headerTitle: '转出结果',
    rightButtonText: '完成',
    onPressRight: params.onPressRight
  })

  componentDidMount () {
    this.setParams({
      onPressRight: () => {
        AppNavigator.goBack(AppNavigator.example.DemoScene)
      }
    })
  }

  render () {
    const {
      amount
    } = this.params
    return (
      <View>
        <Text style={{
          marginTop: 10,
          color: '#008800',
          fontSize: 20,
          textAlign: 'center'
        }}>成功转出{amount}元</Text>
      </View>
    )
  }
}
